﻿using System.IO;
using Styx;
using Styx.Helpers;
using System.ComponentModel;
using DefaultValue = Styx.Helpers.DefaultValueAttribute;
using Styx.Common;
using Styx.Common.Helpers;
using System.Reflection;

namespace KingWoW
{
    [Obfuscation(Exclude = true)] 
    class ExtraUtilsSettings : Settings
    {
        public static ExtraUtilsSettings Instance = new ExtraUtilsSettings();

        public string path_name = Path.Combine(Styx.Common.Utilities.AssemblyDirectory, string.Format(@"KingWOWCurrentSettings/ExtraBuffUtilsSettings/ExtraBuffUtilsSettings-{0}.xml", StyxWoW.Me.SafeName));

        public ExtraUtilsSettings()
            : base(Path.Combine(Styx.Common.Utilities.AssemblyDirectory, string.Format(@"KingWOWCurrentSettings/ExtraBuffUtilsSettings/ExtraBuffUtilsSettings-{0}.xml", StyxWoW.Me.SafeName)))
        {
        }

        [Setting]
        [DefaultValue(40)]
        [Category("HEALTH_ITEMS")]
        [DisplayName("HealPotion_HealthStoneHP HP%")]
        [Description("Use healthstone if lower than HP%")]
        public float HealPotion_HealthStoneHP { get; set; }

        public enum TrinketUseType
        {
            OnBoss,
            OnCrowdControlled,
            Manual,
            Always,
            At_HP,
            At_MANA
        }

        public enum GenericUseType
        {
            OnBoss,
            Manual,
            Always
        }

        [Setting]
        [DefaultValue(TrinketUseType.Manual)]
        [Category("TRINKET_1")]
        [DisplayName("Use Trinket_1")]
        [Description("Use trinket_1 on condition")]
        public TrinketUseType UseTrinket_1_OnCondition { get; set; }

        [Setting]
        [DefaultValue(50)]
        [Category("TRINKET_1")]
        [DisplayName("HP%")]
        [Description("Use trinket_1 on condition At_HP if HP lower than this value")]
        public float Trinket_1_HP { get; set; }

        [Setting]
        [DefaultValue(30)]
        [Category("MANA_ITEMS")]
        [DisplayName("UseManaItemAtMANA%")]
        [Description("UseManaItem if lower than MANA%")]
        public float UseManaItemAtMANA { get; set; }

        [Setting]
        [DefaultValue(50)]
        [Category("TRINKET_1")]
        [DisplayName("MANA%")]
        [Description("Use trinket_1 on condition At_MANA if MANA lower than this value")]
        public float Trinket_1_MANA { get; set; }

        [Setting]
        [DefaultValue(TrinketUseType.Manual)]
        [Category("TRINKET_2")]
        [DisplayName("Use Trinket_2")]
        [Description("Use trinket_2 on condition")]
        public TrinketUseType UseTrinket_2_OnCondition { get; set; }

        [Setting]
        [DefaultValue(50)]
        [Category("TRINKET_2")]
        [DisplayName("HP%")]
        [Description("Use trinket_2 on condition At_HP if HP lower than this value")]
        public float Trinket_2_HP { get; set; }

        [Setting]
        [DefaultValue(50)]
        [Category("TRINKET_2")]
        [DisplayName("MANA%")]
        [Description("Use trinket_2 on condition At_MANA if MANA lower than this value")]
        public float Trinket_2_MANA { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("RACIAL")]
        [DisplayName("enabled ")]
        [Description("Enable/Disable Racial Ability")]
        public bool UseRacials { get; set; }

        [Setting]
        [DefaultValue(70)]
        [Category("RACIAL")]
        [DisplayName("Gift of the Naaru HP%")]
        [Description("Cast Gift of the Naaru if your HP% lower than this value")]
        public int GigtOfTheNaaruHP { get; set; }

        [Setting]
        [DefaultValue(70)]
        [Category("RACIAL")]
        [DisplayName("Arcane Torrent MANA%")]
        [Description("Cast Arcane Torrent if your MANA% lower than this value")]
        public int ArcaneTorrentMana { get; set; }


        [Setting]
        [DefaultValue(false)]
        [Category("BOSS LOGIC")]
        [DisplayName("UseBossLogic")]
        [Description("Enable boss logic: interrupt cast on thock or oondast etc..")]
        public bool UseBossLogic { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("SPEED")]
        [DisplayName("Fastest speed Rotation")]
        [Description("your routine go really fast but your fps decrease if you enable this")]
        public bool FastRotation { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("TARGETTING")]
        [DisplayName("IgnoreLineOfSight")]
        [Description("Be careful: in many encounter lineofSight may return wrong value-> you are in lineofspellsight but HB return false")]
        public bool IgnoreLineOfSight { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("TARGETTING")]
        [DisplayName("provinGround_Targeting")]
        [Description("Be careful! DISABLE IF NOT IN PROVINGROUND")]
        public bool provinGround_Targeting { get; set; } 

        [Setting]
        [DefaultValue(false)]
        [Category("CHAT MESSAGES")]
        [DisplayName("ViewChatMessages")]
        [Description("Be careful: this option enable chat message in WoW client (they are visible only on your client)")]
        public bool ViewChatMessages { get; set; }
 
    }
}
